/**
 * 阅读tab相关接口
 */
import type { DoSignResult, GetIntegralAccountResult, GetMonthSignRecordResult } from './type';
import { get, post } from '@/utils/request';

enum URL {
  doSign = '/app/custCourse/doSign',
  getMonthSignRecord = '/app/custCourse/monthSignRecord',
  getIntegralAccount = '/app/custCourse/integralAccount',
}

// 分享或签到打卡 1-打卡，2-分享
export const doSign = (data: { type: string }) => post<DoSignResult>({ url: URL.doSign, data });

// 当前月份签到列表
export const getMonthSignRecord = () => post<Array<GetMonthSignRecordResult>>({ url: URL.getMonthSignRecord });

// 获取账号积分汇总
export const getIntegralAccount = () => get<GetIntegralAccountResult>({ url: URL.getIntegralAccount });
